package com.stox.client.ui.javafx.widget.dynamic.column.barValue;

import com.stox.client.api.data.provider.BarClient;
import com.stox.client.ui.javafx.widget.dynamic.column.AbstractColumn;
import com.stox.shared.core.i18n.MessageSource;
import com.stox.shared.core.model.enumeration.BarSpan;
import com.stox.shared.core.model.enumeration.BarValue;
import com.stox.shared.core.model.intf.HasScrip;

public class BarValueColumn<S extends HasScrip> extends AbstractColumn<S, Double> {

	private final BarValue barValue;
	private BarSpan barSpan = BarSpan.DAILY;
	
	public BarValueColumn(BarValue barValue, BarClient barClient) {
		this.barValue = barValue;
		setText(MessageSource.get(barValue.name()));
		setPrefWidth(60);
		setMaxWidth(60);
		setMinWidth(60);
		
		setCellValueFactory(new BarValueCellValueFactory<S>(barClient));
	}
	
	
	
	@Override
	public void configure() {
		
		
	}
	
	public BarSpan getBarSpan() {
		return barSpan;
	}
	
	public void setBarSpan(BarSpan barSpan) {
		this.barSpan = barSpan;
	}
	
	public BarValue getBarValue() {
		return barValue;
	}
}
